package com.itheima.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/*
    实现一个servlet处理多个功能
    抽取出一个公共的servlet
 */
public class UserServlet extends BaseServlet {

    private void findAll(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("user findAll");
    }

    private void save(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("user save");
        findAll(req,resp);
    }

    private void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("user update");
    }
}
